﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FireLinkList.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.CodeSetup.FireLinkList" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<%@ Register TagPrefix="APJ" Namespace="APJ.Web.UI.WebControls" Assembly="APJ.Web.UI.WebControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link href="../../css/odms.css" type="text/css" rel="stylesheet" />
</head>
<body class="pub" onresizeend="Menu_RefreshHeight();">
    <form id="FireLink" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M140911" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140811" ParentMenuID="M140911"
                                DMenuMode="CurrOnly" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <!--Insert Code Here.-->
                            <div class="SearchArea" style="margin-bottom: 5px; width: 99.8%;">
                                <table id="tblMain" cellspacing="1" cellpadding="1" width="100%" border="0">
                                    <tr>
                                        <td>
                                            <span style="padding-right: 8px;">
                                                <asp:Label ID="lblStation" runat="server"></asp:Label>
                                            </span>
                                            <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                            </asp:DropDownList>
                                            <span style="padding-left: 8px;">
                                                <asp:Label ID="lblFireLink" runat="server"></asp:Label>
                                            </span>
                                            <asp:TextBox ID="txtFireLinkCode" runat="server" MaxLength="25"></asp:TextBox>
                                            <span style="padding-left: 2px">
                                                <asp:Label ID="lblObsolete" runat="server">Obsolete:</asp:Label>
                                            </span>
                                            <asp:CheckBox ID="chkObsolete" runat="server" />
                                        </td>
                                        <td align="right">
                                        </td>
                                        <td align="right">
                                            <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
                                            <asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClick="btnAddNew_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <APJ:CommonGridView ID="grdSearchResult" runat="server" AutoGenerateColumns="False"
                                AllowPaging="True" BorderColor="black" CssClass="GridView" AllowSorting="True"
                                AscPic="~/Images/Common/arrow_up_green.png" DescPic="~/Images/Common/arrow_down_green.png"
                                DataKeyNames="FireLinkID" OnNeedDataBind="grdSearchResult_NeedDataBind" OnRowCommand="grdSearchResult_RowCommand"
                                Width="100%">
                                <Columns>
                                    <asp:BoundField DataField="FireLinkCode" HeaderText="SOM_FireLinkCode" SortExpression="FireLinkCode" />
                                    <asp:BoundField DataField="StationCode" HeaderText="SOM_Station" SortExpression="StationCode" />
                                    <asp:BoundField DataField="LocationCode" HeaderText="SOM_Location" SortExpression="LocationCode" />
                           
                                    <asp:BoundField DataField="LineCode" HeaderText="SOM_Line" SortExpression="LineCode" />
                                    <asp:TemplateField HeaderText="SOM_EffectiveFrom" SortExpression="EffectiveFrom">
                                        <ItemTemplate>
                                            <asp:Label runat="server" Text='<%# FormatDateTime(Eval("EffectiveFrom").ToString(), false)  %>'
                                                ID="lblEffectiveFrom"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="SOM_EffectiveTo" SortExpression="EffectiveTo">
                                        <ItemTemplate>
                                            <asp:Label runat="server" Text='<%# FormatDateTime(Eval("EffectiveTo").ToString(), false)  %>'
                                                ID="lblEffectiveTo"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="SOM_Void" SortExpression="FlagObsolete">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkFlagObsolete" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"FlagObsolete") %>'
                                                Enabled="False"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="Btn_edit" ToolTip='<%# this.GetLabel("COM_Edit") %>' runat="server"
                                                CssClass="link" CommandName="Edit" CommandArgument='<%# Eval("FireLinkID") %>'
                                                ImageUrl="../../Images/SOM/Edit.gif"></asp:ImageButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle CssClass="GridView_Row" />
                                <HeaderStyle CssClass="GridView_Header" />
                                <AlternatingRowStyle CssClass="GridView_AlternativeRow" />
                                <EmptyDataRowStyle CssClass="GridView_Header" />
                                <PagerTemplate>
                                    <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                        <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                &nbsp; &nbsp;
                                                <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                &nbsp;<asp:Label runat="server">/</asp:Label>
                                                &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                    <asp:ListItem Value="5">5</asp:ListItem>
                                                    <asp:ListItem Value="10">10</asp:ListItem>
                                                    <asp:ListItem Value="15">15</asp:ListItem>
                                                    <asp:ListItem Value="20">20</asp:ListItem>
                                                    <asp:ListItem Value="25">25</asp:ListItem>
                                                    <asp:ListItem Value="30">30</asp:ListItem>
                                                </asp:DropDownList>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                </asp:Panel>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                </PagerTemplate>
                                <EmptyDataTemplate>
                                    <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                        <asp:TableRow runat="server">
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell runat="server"></asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                </EmptyDataTemplate>
                            </APJ:CommonGridView>
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
